package model;

/**
 * Product.java
 * Purpose: Gives information about a product.
 * 
 * @author Maxime Ryckmans
 * @version 0.1 10/01/2012
 */

public class Product {
	/* The id of the category */
	private long categoryId;
	/* Identified the product */
	private long id;
	/* The name of the product */
	private String name;
	/* The price of the product */
	private float price;

	/** Constructs a new product */
	public Product() {
	}
	
	/** Returns the id of the category */
	public long getCategory() {
		return this.categoryId;
	}

	/** Sets the id of the category */
	public void setCategory(long category) {
		this.categoryId = category;
	}
	
	/** Constructs a new product */
	public Product(long id, String name) {
		this.id = id;
		this.name = name;
	}
	
	/** Constructs a new product */
	public Product(long id, String name, int price) {
		this.id = id;
		this.name = name;
		this.price = price;
	}
	
	/** Returns the id of the product */
	public long getId() {
		return id;
	}

	/** Sets the id of the product */
	public void setId(long id) {
		this.id = id;
	}

	/** Returns the name of the product */
	public String getName() {
		return name;
	}

	/** Sets the name of the product */
	public void setName(String name) {
		this.name = name;
	}

	/** Returns the price of the product */
	public float getPrice() {
		return price;
	}

	/** Sets the price of the product */
	public void setPrice(float price) {
		this.price = price;
	}

	/** Returns a string representation of the product */
	@Override
	public String toString() {
		return String.format("%s", this.name);
	}
}